package com.ww.springboot.boot.thread.study;

import java.util.concurrent.TimeUnit;

/**
 * todo timeUnit
 *
 * @author wanwei
 * @since 2021-04-17 15:16
 */
public class TimeUnitTest {
    public static void main(String[] args) throws InterruptedException {
        TimeUnit.SECONDS.sleep(1);
        //休眠
        Thread.sleep(1);
        //释放CPU占用
        Thread.yield();

        //设置优先级(CPU空闲时设置无意义)
        Thread thread = new Thread();
        thread.setPriority(1);
    }
}
